{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcss.css">
<ul class="nav nav-tabs">
	<span class="ygxian"></span>
	<div class="ygdangq">当前位置:</div>
	<li><a href="{php echo $this->createWebUrl2('sjcoupon')}">超级券管理</a></li>
	<li class="active"><a href="{php echo $this->createWebUrl2('sjaddcoupon')}">添加/编辑超级券</a></li>
</ul>
<div class="main">
	<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
		<!--<input type="hidden" name="parentid" value="{$parent['id']}" />-->
		<div class="panel panel-default ygdefault">
			<div class="panel-heading wyheader">
				超级券管理
			</div>
			<div class="panel-body">
				<form class="form-horizontal" action="" method="POST">

					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label" style="margin-right: 15px;"><font color="red">*</font>超级券分类</label>
						<select class="col-sm-8" name="type_id">
							{loop $type $key $item}
							{if $item['id']==$list['type_id']}
							<option value="{$item['id']}" selected="selected">{$item['type_name']}</option>
							{else}
							<option value="{$item['id']}" >{$item['type_name']}</option>
							{/if}
							{/loop}
						</select>
						<div class="help-block col-md-8 col-md-offset-2">
						</div>
					</div>
					<div class="form-group">

						<label for="inputEmail3" class="col-sm-2 control-label">超级券名称</label>

						<div class="col-sm-10">

							<input type="text"  name="name" value="{$list['name']}" class="form-control" id="inputEmail3" placeholder="请填写超级券名称">

						</div>

					</div>

					<div class="form-group">

						<label for="inputEmail3" class="col-sm-2 control-label">优惠金额</label>

						<div class="col-sm-5">
							<div class="input-group">
								<input type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" name="reduce" value="{$list['reduce']}" class="form-control" id="inputEmail3" placeholder="请填写优惠金额">
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>				
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">优惠条件</label>
						<div class="col-sm-10">
							<input type="text"  name="full" value="{$list['full']}" class="form-control" id="inputEmail3" placeholder="请输入优惠条件,不填为无门槛">
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">发放数量</label>
						<div class="col-sm-10">
							<input type="number"  name="number" value="{$list['number']}" class="form-control" id="inputEmail3" placeholder="请填写数量">
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">有效日期</label>
						<div class="col-sm-10">
							   {php echo tpl_form_field_date('end_time',$info['end_time'],$withtime = false)}
						</div>
					</div>
					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">领取金额</label>
						<div class="col-sm-5">
							<div class="input-group">
								<input type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" name="money" value="{$list['money']}" class="form-control" id="inputEmail3" placeholder="请填写领取金额">
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>	

					<div class="form-group">
						<label for="inputEmail3" class="col-sm-2 control-label">使用说明</label>
						<div class="col-sm-10">
							<input type="text"  name="details" value="{$list['details']}" class="form-control" id="inputEmail3" placeholder="请填写使用说明">
						</div>
					</div>
					<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">轮播图片</label>
                    <div class="col-sm-9">
                       {php echo tpl_form_field_multi_image('img',$img);}
                       <span class="help-block">* 建议尺寸大小:450*450px</span>
                    </div>
                </div>
					<input type="hidden" name="id" value="{$list['id']}"/>

					<input type="hidden" name="token" value="{$_W['token']}"/>

					<div class="form-group" style="margin-top: 20px;">
						<input type="submit" name="submit" value="提交" class="btn col-lg-3" style="color: white;background-color: #44ABF7;"/>

					</div>
				</form>

			</div>
			<script type="text/javascript">
				$(function(){
					$("#frame-3").show();
					$("#yframe-3").addClass("wyactive");
				})
			</script>{template 'common/footer'}